app.controller('shouyeCtrl',['$scope','$http',function($scope,$http){
	$scope.dataList = [];
	$http.get('http://h5.yztctech.net/api/axf/apihome.php')
	.success(function(res){
	    $scope.dataList = res.data.slide;
	})
	
	setTimeout(mySwiper,1000); 
	
	//获取热卖数据
	$scope.dataList2 = [];
	$http.get('http://h5.yztctech.net/api/axf/apihome.php')
	.success(function(res){
		$scope.dataList2 = res.data.menu;
	})
	
	//获取list3的数据
	
//	$scope.dataList3 = [];
//	$http.get('http://h5.yztctech.net/api/axf/apihomehot.php')
//	.success(function(res){
//		$scope.dataList3 = res.data;
//		console.log($scope.dataList3);
//		
//	})
	
}]);

function mySwiper(){
	
	new Swiper('.swiper-container',{
	      loop:true,
	      autoplay:1000
	 }); 
	 
}
